<template>
  <el-card
    shadow="hover"
    @mouseenter.native="enterShow(itemData.itemDatas)"
    @mouseleave.native="outHide()"
    style="position:absolute"
    v-if="itemData.isShowBox"
  >
    <div class="header-search-input">
      <el-input placeholder="请输入内容" v-model="searchVal">
        <el-button slot="append" icon="el-icon-search"></el-button>
      </el-input>
    </div>
    <div class="header-search-items">
      <div class="header-search-item">{{itemData.itemDatas}}</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
      <div class="header-search-item">金融栏目科技</div>
    </div>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      searchVal: "",
      changeVal: 0,
      showCards: false,
      cardsLsit: 5,
    };
  },
  props: ["itemData"],
  methods: {
    enterShow(n) {
      // this.current = n;
      this.showCards = true;
      this.$emit("changevalFun", this.showCards);
    },
    outHide(n) {
      this.showCards = false;
      this.$emit("changevalFun", this.showCards);
    },
  },
};
</script>
<style scoped>
.el-card {
  width: 75%;
  background: #eeee;
  border: 1px solid #eaeefb;
  box-sizing: border-box;
  transition: all 1s;
  height: 300px;
  z-index: 4;
  left: 15%;
  top: 60px;
}
.el-card:hover {
  /* bottom: 6px; */
  box-shadow: 0 6px 18px 0 rgb(232 237 250 / 50%);
}
.el-card__body {
  padding-top: 0px;
}
.header-search-input {
  width: 200px;
  height: 20px;
  margin: 0 auto;
}
.header-search-items {
  width: 500px;
  margin: 30px auto;
  width: 650px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.header-search-item {
  width: 230px;
  height: 30px;
  line-height: 30px;
}
</style>
